package com.xfsong.demo.service.impl;

import com.xfsong.demo.entity.Members;
import com.xfsong.demo.mapper.MembersMapper;
import com.xfsong.demo.service.MembersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MembersServiceImpl implements MembersService {

    @Autowired
    private MembersMapper membersMapper;

    @Override
    public int registerMember(Members members) {
        return membersMapper.insertMember(members);
    }

    @Override
    public int checkUsername(String username) {
        return membersMapper.selectByUsername(username);
    }

    @Override
    public int checkMobile(String mobile) {
        return membersMapper.selectByMobile(mobile);
    }

    @Override
    public Members selectMemberByUsername(String username) {
        return membersMapper.selectMemberByUsername(username);
    }


}
